class P2PConstraints {
  //media 约束
  static const Map<String, Object> mediaConstraints = {
    'audio': true,
    'video': {
      // 强制
      'mandatory': {
        'minWidth': '640',
        'minHeight': '480',
        'minFrameRate': '30'
      },
      'facingMode': 'user',
      'optional': [] //可选
    },
  };
  //PeerConnection约束
  static const Map<String, Object> pcConstraints = {
    'mandatory': {},
    'optional': [
      //如果要与浏览器互通开启DtlsSrtpKeyAgreement
      {'DtlsSrtpKeyAgreement': true},
    ],
  };
  // 视频 SDP 约束
  static const Map<String, Object> sdpConstraints = {
    'mandatory': {
      //是否接收语音数据
      'OfferToReceiveAudio': true,
      //是否接收视频数据
      'OfferToReceiveVideo': true,
    },
    'optional': [],
  };

  // 音频 SDP 约束
  static const Map<String, Object> audioSdpConstraints = {
    'mandatory': {
      //是否接收语音数据
      'OfferToReceiveAudio': true,
      //是否接收视频数据
      'OfferToReceiveVideo': false,
    },
    'optional': [],
  };
  //非音视频 SDP 约束
  static const Map<String, Object> dataSdpConstraints = {
    'mandatory': {
      //是否接收语音数据
      'OfferToReceiveAudio': false,
      //是否接收视频数据
      'OfferToReceiveVideo': false,
    },
    'optional': [],
  };
}
